package com.coda.mapper;

import com.coda.adminVo.appointment.AppointmentQueryVo;
import com.coda.adminVo.appointment.AppointmentVo;
import com.coda.annotation.AutoFill;
import com.coda.entity.ViewAppointment;
import com.coda.enumeration.OperationType;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface ViewAppointmentMapper {
    /**
     * 条件分页查询信息
     * @param appointmentQueryVo
     * @return
     */
    Page<AppointmentVo> getPageList(AppointmentQueryVo appointmentQueryVo);

    /**
     * 根据id更新预约状太
     */
    @AutoFill(OperationType.UPDATE)
    @Update("update view_appointment set appointment_status = #{appointmentStatus} where id = #{id}")
    void updateStatus(ViewAppointment viewAppointment);


}
